<?php
	require_once('init.php');
	
	if (isset($_GET['id'])) 
	{
		$id = $_GET['id'];
	}
	else 
	{
		$id = $_POST['id'];
	}
	//query product by columnid
	$product = $adminDB->executeSQL("select p.id from ".$util->contentdbName().".tbIndex i left outer join ".$util->contentdbName().".tbProduct p on i.fdContentID = p.fdContentID where i.fdColumnID = ".$id." and p.fdStatus != 3", $connID);	
	
	echo "<script>window.location =\"details.php?pid=".$product[0]['id']."\";</script>";
?>